<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/base.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		
		<title>CRM客户关系管理系统</title>
		<link href="<%=basePath %>css/all.css" media="screen" rel="stylesheet" type="text/css" />
   		<link href="<%=basePath %>css/application.css" media="print" rel="stylesheet" type="text/css" />
   		<link href="<%=basePath %>css/blue.css" media="screen" rel="stylesheet" title="Theme" type="text/css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/bootstrap.min.css" />
		
		<link rel="stylesheet" href="<%=basePath %>Date/css/jquery-ui.css" type="text/css" />
		<link rel="stylesheet" href="<%=basePath %>Date/css/ui.daterangepicker.css" type="text/css" />
		
	
</head>
<body class="clearfix contact_dates  webkit  windows"  onloadnot="setupZoom()">
	

		<div id="wrapper">
			<div id="inner_wrapper">
				<div id="main_body" class="column">
        
        
        
        <div id="blank_slate" class="clearfix">
          
        </div>

        
                  <!-- page -->
        <div id="page">
          <div id="screen_body">

            <!-- page header -->
            <div id="page_header_wrapper">
              
              <div id="page_header">

                <div class="page_header">
  			<h1 class="index">关于<a href="/people/137020703-qs">${sessionScope.curr_contact.name}</a>的纪念日</h1>
  			<a class="admin" href="<%=basePath %>contact/returnPcontact.action?&rid={sessionScope.curr_contact.id}" >返回</a>
  			
</div>

              </div>
            </div>
            <!--// page header -->

            <!-- page contents -->
            <div id="page_contents_wrapper" class="clearfix">

              <!-- main column -->
              <div id="page_main_column" class="column">
                <div class="liner">
                  





<table> 

<div id="contact_dates">

<div class="contact_date_wrapper" id="contact_date_492672">
  <div class="contact_date">    
	   <tr>
	   	<th width="2px">纪念日主题</th>
	   	<th width="20%">类型</th>
	   	<th width="40%">提醒时间</th>
	   </tr>
  </div>
</div>
</div>
 </table> 
 
<c:forEach items="${customerCareSet}" var="c">
<table> 
<div id="contact_dates">

<div class="contact_date_wrapper" id="contact_date_492672">
  <div class="contact_date">    
	<span class="edit_links">
          <a class="admin" href="#"  id="contact_careEdit_a"><span>编辑</span></a>
          <a class="image" href="<%=basePath %>contact/delCare?&careId=${c.id}" >
          <span class="sprite " style="background: url(<%=basePath %>img/highrise_sprites.png) no-repeat -111px -180px; width: 10px; padding-top: 11px; " title="Delete" id="btn">删除</span></a>
        </span>  
         
	   <tr>
	
	   	<th width="40%">${c.title}</th>
	   	<th width="20%">${c.type}</th>
	   	<th width="30%">${c.remindtime}</th>
	   </tr>
  </div>
</div>
</div>
	 </table>   
</c:forEach>
<div id="link_to_add_contact_date">
  <a class="admin" href="#" >添加日期</a>
</div>

<div id="add_contact_date" style="display: none">
  <div class="new_contact_date_wrapper contact_date_form">
  <div class="inner">
    <h4>添加一个新的日期</h4>
    <form action="<%=basePath %>contact/addcare.action" class="new_contact_date" id="new_contact_date" method="post" >
    <div style="margin:0;padding:0;display:inline">
    <input name="authenticity_token" type="hidden" value="hhwFOyX0dUu7v2rMtlKAzuuLAuWQN323A/7kVux2W8E=" />
    </div>
     
      <table>
      <tr>
      	<th>主题:</th>
      	<td>
      		<input type="text" name="customercare.title"/>
      	</td>
      
      </tr>
  <tr>
  
  
    <th>日期:</th>
    <td>
        <input type="text" value=" " name="customercare.remindtime" id="rangeA"/>
    </td>
  </tr>
   
  <tr>
     <th>类型:</th>
    <td>
    <select id="" name="customercare.type" onchange="Element[$F(this) ? 'hide' : 'show']($(this).up('tr').next('tr'))">
    <option value="Birthday" selected="selected">生日</option>
	<option value="Anniversary">周年庆</option>
	<option value="First met">第一次见面</option>
	<option value="Hired">入职</option>
	<option value="Fired">被解雇</option>
	<option value="Renewal">续签合同</option>
	<option value="">其它...</option>
	</select>
	</td>
  </tr>
  <tr class="custom_description" style="display:none">
    <th></th>
    <td>
      <input id="contact_date_custom_description" name="contact_date[custom_description]" size="30" type="text" value="" />
    </td>
  </tr>
  
  
   <tr>
    <th>具体细节:</th>
    <td>
      <textarea cols="10" id="person_background" name="customercare.describe" rows="2">
		</textarea>
    </td>
  </tr>
  
  
  <tr>
    <th style="padding-top: 10px;">
      &nbsp;
    </th>
    <td style="padding-top: 10px;">
      <input name="contact_date[assign_task]" type="hidden" value="0" />
      <input id="contact_date_assign_task" name="contact_date[assign_task]" onclick="$(this).up('tr').next('tr').toggle()" type="checkbox" value="1" />
      <label for="contact_date_assign_task">创建一个纪念这个日期的任务</label>
    </td>
  </tr>
  <tr style="display: none">
    <th>
    </th>
    <td>
      为 <select id="" name="contact_date[task_owner_id]">
      <option value="803795">李 小俊</option></select>
    </td>
  </tr>

      <tr>
        <th>&nbsp;</th>
        <td>
          <p class="submit" id="submit">
            <input name="commit" type="submit" value="添加这个日期" />
            <span>
             	或者
             
             
             <div id="cancle_contact_date">
 				 <a class="admin" href="#" >取消</a>
				</div>
             
            </span>
          </p>
        </td>
      </tr>
      </table>
    </form>
  </div>
</div>

</div>




                </div>
              </div>
              <!--// main column -->

              <!-- page sidebar -->
              <div id="page_sidebar" class="Right column">
                <div class="liner">
                  
  <div class="sidebox_wrapper">
    <div class="liner">
      <div class="sidebox closedbox">
  <h5>这是关于</h5>
  
    <div class="avatar_subject" id="person_137020703">
  <a href="/people/137020703-qs" class="image"><img alt="qs" class="avatar" height="32" src="<%=basePath %>img/5.jpg" title="qs" width="32" /></a>

  <div class="info">
    <h1 >
      <a href="/people/137020703-qs" class="to_person">
        <span>${sessionScope.curr_contact.name}的重要日子</span> 
      </a>
      <span class="quick_show_tag hover_container hover_target" href="/people/137020703-qs.preview" quick_show_title="qs">
      <span class="sprite " style="background: url(https://d1a993iq9azmzq.cloudfront.net/rev_0621f90/images/highrise_sprites.png) no-repeat -142px -181px; width: 14px; padding-top: 12px; " title="" id=""></span></span>
    </h1>

    <h2>
      
      
      
    </h2>
  </div>
</div>

  
</div>

    </div>
  </div>

                </div>
              </div>
              <!--// page sidebar -->
              
            </div>
            <!--// page contents -->
            
          </div>
        </div>
        <!--// page -->


        
        
        
        <div style="margin-top: 30px"> </div>        
      </div>

	
	

	</div>	
	</div>	

  <hr style="display: none;" />
	<div id="preloaded_images" style="position:absolute; height:0px; overflow:hidden;">
		<img alt="Dots-white" src="<%=basePath %>img/dots-white.gif" />
		<img alt="Dots-black" src="<%=basePath %>img/dots-black.gif" />
	</div>
  <script src="<%=basePath %>js/sprockets.js" type="text/javascript"></script>    
  
  <script type="text/javascript">
  		document.getElementById("link_to_add_contact_date").onclick=function(){
  			document.getElementById("add_contact_date").style.display="block";
  		};
  </script>
  
		 <script type="text/javascript" src="<%=basePath %>Date/js/jquery.min.js"></script>
		<script type="text/javascript" src="<%=basePath %>Date/js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="<%=basePath %>Date/js/date.js"></script>
		<script type="text/javascript" src="<%=basePath %>Date/js/daterangepicker.jQuery.js"></script>
	
		<script type="text/javascript">	
			$(function(){
				  $('#rangeA').daterangepicker(); 
				
			 });
		</script> 
	<script type="text/javascript">
		document.getElementById("cancle_contact_date").onclick=function(){
  			document.getElementById("add_contact_date").style.display="none";
  		};
	</script>
		

	
	<script type="text/javascript">

		document.getElementById("btn").onclick=function(){
			if(confirm("您确定要删除吗？")) {
				alert("删除成功！");
			}
		};
	
	</script>
	
		
</body>
</html>